package nettydemo;/*

 */

import sun.applet.Main;

import java.nio.ByteBuffer;

/**
 * @ClassName NioByteBufferPutGet
 * @Author Final
 * @Project DataStructures
 */
public class NioByteBufferPutGet {
    public static void main(String[] args) {
        ByteBuffer byteBuffer=ByteBuffer.allocate(50);
        byteBuffer.putInt(100);
        byteBuffer.putLong(2L);
        byteBuffer.putDouble(2.1);

        byteBuffer.flip();

        byteBuffer.getInt();
        byteBuffer.getLong();
        byteBuffer.getDouble();

        System.out.println(byteBuffer.getDouble());

    }
}
